from datetime import datetime

from pydantic import BaseModel

from models.image import Image
from schemas.common import Paging


class ProductCreate(BaseModel):
    name: str
    attribute: int
    price: float
    image_id: int

class ProductResponse(BaseModel):
    id: int
    name: str
    attribute: int
    price: float
    image: Image
    created_at: datetime


class ProductsResponse(BaseModel):
    data: list[ProductResponse]
    paging: "Paging"
